草庐IT

UI 自动化测试

全部标签

javascript - 我如何测试三星智能电视应用程序?

我开发了一款三星智能电视应用程序,在三星模拟器中对其进行了测试,它运行良好。现在我将如何在不将其上传到三星应用商店的情况下在电视上对其进行测试。 最佳答案 简短的版本是:使用SDK构建包并将其发布到网络服务器。在电视上创建一个名为“develop”的帐户。将电视配置为与您将应用程序发布到的服务器的IP地址同步。同步应用程序。三星网站上的文档“TestingYourApplicationonaTV”中提供了完整的详细信息。要找到其中一些选项,需要深入查看大量菜单。请注意,三星最近发布了4.0SDK,因此您可能会发现您的软件看起来与文档

javascript - 单元测试 AngularJS 模块 Controller

我正在查看TODOMVCAngularJS示例,我看到该应用程序被定义为一个模块。vartodomvc=angular.module('todomvc',[]);在Controller内部,我看到它们被定义为:todomvc.controller('TodoCtrl',functionTodoCtrl($scope,$location,todoStorage,filterFilter){//...});我的问题涉及单元测试...如何为该类编写单元测试?我试过这样的事情:describe('TodoCtrl',function(){varcontroller;beforeEach(fun

javascript - 根据同时在另一个字段中输入的内容自动填充字段

我试图找出如何根据使用javascript在另一个输入字段中输入的内容自动填充输入值。这是我的代码:add=document.getElementById('address').value;city=document.getElementById('city').value;state=document.getElementById('state').value;zip=document.getElementById('zip').value;compAdd=add+""+city+""+state+""+zip;functionshowAdd(){document.getElemen

javascript - 使用 Google places API 仅自动完成地名

我已经使用成功设置了GooglePlacesAPI的自动完成功能varinput=document.getElementById('place_name');varautocomplete=newgoogle.maps.places.Autocomplete(input);但这会自动用完整地址填充文本框place_name,例如“ABC,SomeStreet,Washington,WA,UnitedStates”但我只想用地名填充文本框,例如ABC就我而言。我该怎么做?我试过了google.maps.event.addListener(autocomplete,'place_chang

javascript - Angular.js promise 在使用 karma 进行单元测试服务时不会解析

我正在尝试对Angular.js服务进行单元测试,并且需要对从模拟服务(使用Jasmine)返回的promise设置期望。我正在使用karma单元测试框架。相关代码片段如下://Ican'tfigureouthowtodotheequivalentofa$scope.$digesthere.varloginStatusPromise=FacebookService.getFacebookToken();loginStatusPromise.then(function(token){expect(false).toBeTruthy();//Ifthistestpasses,thereis

javascript - angular.js ui + bootstrap typeahead + 异步调用

我将typeahead与angular.js指令一起使用,但我填充自动完成的函数进行了异步调用,我无法返回它来填充自动完成。无论如何让它与这个异步调用一起工作? 最佳答案 我可以假设您正在使用Bootstrap2.x的typeahead吗?如果是这样,在文档中,typeahead()选项的source字段的描述是这样的:Thedatasourcetoqueryagainst.Maybeanarrayofstringsorafunction.Thefunctionispassedtwoarguments,thequeryvaluein

javascript - 如何使用 Selenium webdriver 测试对 SVG 对象的点击?

我正在尝试编写代码来检查单击SVG对象的功能-例如此URL上的美国州http://www.amcharts.com/svg-maps/?map=usa这行得通,但是有更好的方法吗?没有物理移动鼠标的东西?robert=newRobot();robert.mouseMove(x,y);//fullclickoncetogetfocusonthewindowrobert.mousePress(MouseEvent.BUTTON1_MASK);robert.mouseRelease(MouseEvent.BUTTON1_MASK);//thensetthefilterrobert.mouse

javascript - jquery ui slider 范围修复到 RTL

我想将Jqueryslider范围更改为RTL。我正在使用这个:http://jqueryui.com/slider/#rangeJ查询代码:$(function(){$("#slider-range").slider({range:true,min:0,max:1000000,values:[100000,500000],slide:function(event,ui){$("#amount").val(addCommas(ui.values[1])+"تومان"+addCommas(ui.values[0])+"تومان");}});$("#amount").val(addCo

javascript - 如何在 CasperJS 断言失败时继续测试用例?

有没有办法在发生故障时继续测试套件?例如:casper.test.begin("",3,functionsuite(){casper.start(url).then(function(){test.assert(...);test.assert(...);//Ifthisassertfail,thescriptstopandthethirdassertisn'ttestedtest.assert(...);}).run(function(){test.done();});});我希望所有断言都经过测试,即使有些失败。可能吗? 最佳答案

javascript - 如果在 angularJS 的配置中配置,则测试 stateProvider 状态在 $state 上返回 null

我有这样一个配置:angular.module('myModule',['ui.router']).config(['$stateProvider',function($stateProvider){$stateProvider.state('app.home',{abstract:true,url:'/home',template:'FooBar'});}]);和像这样使用jasmine的单元测试:'usestrict';describe('Module:myModule',function(){var$rootScope,$state;beforeEach(module('ui.r